<template>
  <!-- 管理客户-客户详情 -->
  <div class="customer_information_details">
    <!-- 顶部导航 -->
    <div class="customer_information_details_top">
      <van-nav-bar
        title="客户详情"
        left-arrow
        @click-left="$router.go(-1)"
        :border="false"
        fixed
        z-index="999"
      >
        <template #right>
          <van-icon
            name="wap-home-o"
            size="25"
            @click="$router.push('/home')"
          />
        </template>
      </van-nav-bar>
    </div>
    <div class="customer_information_details_bottom">
      <div class="customer_information_details_bottom_1">
        <!-- 头部客户信息 -->
        <div class="bottom_box">
          <div class="bottom_box_middle">
            <!-- 头像 -->
            <van-image
              round
              width="0.62rem"
              height="0.62rem"
              :src="headPortrait"
            />
            <!-- 名称 -->
            <div class="box_middle">
              <div class="bottom_box_middle_1">{{ information.custName }}</div>
            </div>
          </div>

          <!-- 编辑信息 -->
          <van-button
            @click="
              $router.push({
                path: '/EditCustomerInformation',
                query: { info: JSON.stringify(information) },
              })
            "
          >
            编辑信息
          </van-button>
        </div>
      </div>
      <div class="customer_information_details_bottom_2">
        <div class="bottom_2_top">
          <img src="../assets/基本信息.png" alt="" />
          <div>基本信息</div>
        </div>

        <div class="bottom_2_bottom">
          <div class="div_f div_one">
            <div class="div">客户名称</div>
            <span>{{ information.custName }}</span>
          </div>
          <div class="div_f">
            <div class="div">联系电话</div>
            <span>{{ information.telephone }}</span>
          </div>
          <div class="div_f">
            <div class="div">学历</div>
            <span>{{ information.education }}</span>
          </div>
          <div class="div_f">
            <div class="div">性别</div>
            <span>{{ information.sex }}</span>
          </div>
          <div class="div_f">
            <div class="div">年龄</div>
            <span>{{ information.age }}</span>
          </div>
          <div class="div_f">
            <div class="div">所属城市</div>
            <span>{{ information.cityName }}</span>
          </div>
          <div class="div_f">
            <div class="div">公司名称</div>
            <span>{{ information.company }}</span>
          </div>
          <div class="div_f">
            <div class="div">职位</div>
            <span>{{ information.position }}</span>
          </div>
          <div class="div_f">
            <div class="div">录入时间</div>
            <span>{{ information.createTime }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { CustomerInformationDetails } from "@/request/api";
export default {
  data() {
    return {
      headPortrait: require("../assets/头像男 拷贝 4.png"),

      information: [],
    };
  },
  created() {
    this.id = JSON.parse(this.$route.query.info);
    CustomerInformationDetails(this.id).then((res) => {
      // console.log(res);
      this.information = res.data;
    });
  },
};
</script>
 
<style lang = "less" scoped>
/* 顶部导航 */
.customer_information_details_top {
  .van-nav-bar {
    background-color: #003399;
  }

  /deep/.van-icon,
  /deep/.van-nav-bar__title {
    color: #ffffff;
  }
}
/* 客户详情 */
.customer_information_details_bottom {
  width: 100%;
  height: 1.8rem;
  background-color: #039;
  .customer_information_details_bottom_1 {
    .bottom_box {
      width: 3.2rem;
      height: 0.95rem;
      border-radius: 0.1rem 0.1rem 0 0;
      display: flex;
      justify-content: space-between;
      margin: 0 auto;
      padding-top: 0.3rem;

      .van-image {
        padding: 0.2rem;
      }
      .bottom_box_middle {
        display: flex;
        .box_middle {
          padding-top: 0.35rem;
          .bottom_box_middle_1 {
            color: #fff;
            padding-top: 0.1rem;
          }
        }
      }
      .van-button {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.3);
        height: 0.32rem;
        border: none;
        border-radius: 9.99rem 0 0 9.99rem;

        margin-top: 0.35rem;
      }
    }
  }
  .customer_information_details_bottom_2 {
    height: 5rem;
    width: 3.5rem;
    background-color: #fff;
    z-index: 10;
    margin: 0 auto;
    border-radius: 0.1rem;
    .bottom_2_top {
      width: 3.1rem;
      height: 0.5rem;
      margin: 0 auto;
      border-bottom: 0.01rem dashed #ccc;
      display: flex;
      img {
        width: 0.2rem;
        height: 0.2rem;
        padding-top: 0.15rem;
        padding-right: 0.15rem;
      }
      div {
        line-height: 0.5rem;
      }
    }
    .bottom_2_bottom {
      width: 3.1rem;
      margin: 0 auto;
      font-size: 0.14rem;
      line-height: 0.4rem;
      .div_one {
        padding-top: 0.1rem;
      }
      .div_f {
        display: flex;
      }
      .div {
        width: 0.6rem;
        color: #999999;
        margin-right: 0.1rem;
        text-align: right;
      }
      span {
        color: #333;
      }
    }
  }
}
</style>